package com.sbwebsocket.core.model.bo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Collections;
import java.util.List;

/**
 * @Auther: GSJ
 * @Date: 2022/2/10
 * @Description:
 * @version: 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DirectMessageBody extends NormalMessageBody {
    //发送给某个客户端列表
    private List<String> sendClientIdentitys;

    public DirectMessageBody(String sendClientIdentity, String body) {
        this.sendClientIdentitys = Collections.singletonList(sendClientIdentity);
        this.setBody(body);
    }

    public DirectMessageBody(List<String> sendClientIdentitys, String body) {
        this.sendClientIdentitys = sendClientIdentitys;
        this.setBody(body);
    }
}
